/* 新增装饰容器样式 */
.decorative-characters {
    position: absolute;
    left: -180px;
    top: 20%;
    width: 160px;
    z-index: 0;
    opacity: 0.9;
    transition: transform 0.3s ease;
  }
  
  .decorative-characters:hover {
    transform: translateY(-5px);
  }
  
  .character {
    width: 60px;
    height: 60px;
    margin: 10px;
    cursor: pointer;
    filter: drop-shadow(2px 2px 4px rgba(58, 132, 255, 0.2));
  }
  
  /* 新增雪碧图动画 */
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  
  .character:nth-child(odd) {
    animation: float 3s ease-in-out infinite;
  }


/* 新增背景装饰图案 */
.medication-container::before,
.medication-container::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: linear-gradient(45deg, rgba(33, 150, 243, 0.25) 0%, rgba(66, 165, 245, 0.3) 100%);
  border-radius: 30% 70% 70% 30%;
  filter: blur(80px);
  opacity: 0.9;
  z-index: -1;
  animation: float 15s ease-in-out infinite;
}

.medication-container::after {
  background: linear-gradient(225deg, rgba(51, 164, 234, 0.25) 0%, rgba(124, 58, 237, 0.3) 100%);
  animation-delay: -9s;
}

.medication-container::before {
  top: 0;
  left: 0;
  transform: translate(-30%, -30%);
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(255, 255, 255, 0.25) 100%);
}

.medication-container::after {
  top: 0;
  right: 0;
  transform: translate(30%, -30%);
  background: linear-gradient(225deg, rgba(119, 128, 202, 0.3) 0%, rgba(156, 183, 241, 0.35) 100%);
  animation-delay: -9s;
  filter: blur(90px);
}

.medication-container::before {
  animation: float 15s ease-in-out infinite, glow 4s ease-in-out infinite alternate;
}

@keyframes glow {
  0% { opacity: 0.8; filter: blur(80px); }
  100% { opacity: 1; filter: blur(100px); }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(15px, 15px) rotate(8deg) scale(1.1);
  }
  50% {
    transform: translate(-20px, 25px) rotate(-10deg) scale(0.9);
  }
  75% {
    transform: translate(20px, -15px) rotate(5deg) scale(1.05);
  }
}

/* 弹出对话框容器 */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

.popup-container.show-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 背景遮罩 */
.popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    transition: background-color 0.3s ease;
}

/* 弹出对话框主体 */
.popup-dialog {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f0f8ff);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 680px;
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    z-index: 1;
}

.popup-container.show-popup .popup-dialog {
    transform: scale(1);
    opacity: 1;
}

/* 对话框进入动画 */
.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 对话框头部 */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-bottom: 1px solid #bbdefb;
}

.popup-title {
    display: flex;
    align-items: center;
}

.header-icon {
    color: #1976d2;
    font-size: 28px;
    margin-right: 12px;
}

.popup-title h3 {
    font-size: 1.6rem;
    color: #0d47a1;
    font-weight: 600;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    color: #607d8b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #37474f;
}

/* 表单样式 */
.popup-form {
    padding: 30px;
}

.el-form-item {
    margin-bottom: 24px;
}

/* 对话框底部 */
.popup-footer {
    display: flex;
    justify-content: flex-end;
    padding: 20px 30px 30px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}


/*左边提示语*/
.vertical-warning {
    writing-mode: vertical-rl;
    position: fixed;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ff4d4f;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 2px;
    padding: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
}



.custom-confirm-btn {
    padding: 12px 28px!important;
    border-radius: 8px!important;
    font-size: 15px!important;
    background: linear-gradient(135deg, #64b5f6, #42a5f5)!important;
    border: none!important;
    transition: transform 0.2s ease;

    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
    }
}

.custom-cancel-btn {
    padding: 12px 28px!important;
    border-radius: 8px!important;
    font-size: 15px!important;
    background: linear-gradient(135deg, #f5f7fa, #e8edf5)!important;
    color: #607d8b!important;
    border: 1px solid #e0e0e0!important;

    &:hover {
        background: linear-gradient(135deg, #eceff1, #e3e9f1)!important;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 50%, #d1eeff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #2c3e50;
    padding: 20px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="30" viewBox="0 0 24 30"><path fill="%23409EFF" d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z"/></svg>'), auto;
}



/* 主容器 */
.medication-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    position: relative;
    z-index: 1;
}

/* 标题样式 */
h3{
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #1a73e8;
    text-shadow: 0 2px 4px rgba(0, 0, 150, 0.1);
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4fc3f7, transparent);
    border-radius: 3px;
}

/* 示例数据提示 */
.sample-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
    padding: 14px 20px;
    margin: 0 auto 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    font-size: 16px;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(4px);
    animation: float 4s ease-in-out infinite;
}

.sample-notice i {
    margin-right: 12px;
    font-size: 22px;
    color: #1e88e5;
}

/* 卡片网格布局 */
.medication-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

/* 卡片样式 */
.medication-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 251, 255, 0.9) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(140, 200, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(173, 216, 230, 0.3);
    transform: translateY(0);
    backdrop-filter: blur(8px);
}

.medication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6, #03a9f4);
    border-radius: 20px 20px 0 0;
}

.medication-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(100, 181, 246, 0.3);
}

.medication-card.sample-data {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.75) 0%, rgba(240, 248, 255, 0.8) 100%);
    border: 1px dashed rgba(100, 181, 246, 0.4);
}

/* 卡片头部 */
.medication-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(173, 216, 230, 0.4);
}

.medication-name {
    font-weight: 600;
    font-size: 1.4rem;
    color: #1565c0;
    flex: 1;
}

.medication-name span {
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 500;
}

.medication-status {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

/* 详情行 */
.medication-details {
    display: grid;
    gap: 16px;
}

.detail-row {
    display: flex;
    line-height: 1.6;
}

.detail-label {
    color: #546e7a;
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.detail-label i {
    margin-right: 8px;
    color: #29b6f6;
    font-size: 16px;
}

/* 输入框 */
.form-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    color: #37474f;
}

.form-input:focus {
    border-color: #29b6f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

/* 按钮容器 */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 40px 0;
}

/* 按钮样式 */
.el-button {
    border-radius: 50px !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.2) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.el-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.3) !important;
}

.el-button:active {
    transform: translateY(2px);
}

.el-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    clip-path: circle(0 at center);
    transition: clip-path 0.5s ease;
}

.el-button:hover::after {
    clip-path: circle(200px at center);
}

.el-button--primary {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%) !important;
}

.el-button--success {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%) !important;
}

.el-button--danger {
    background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%) !important;
}

/* 卡片操作按钮 */
.card-actions {
    margin-top: 20px;
    text-align: right;
    padding-top: 15px;
    border-top: 1px dashed rgba(173, 216, 230, 0.4);
}

/* 分页控件 */
.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.total-records-notice {
  opacity: 0;
  animation: fadeIn 0.5s ease-out 1s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 用药记录列表容器 */
.medication-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  padding: 20px 0;
}

/* 单个用药卡片 */
.medication-card {
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  transition: transform 0.2s;
  margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .medication-card {
    max-width: 95%;
    padding: 1rem;
  }
}

.medication-card {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.medication-card:nth-child(1) { animation-delay: 0.1s; }
.medication-card:nth-child(2) { animation-delay: 0.2s; }
.medication-card:nth-child(3) { animation-delay: 0.3s; }
.medication-card:nth-child(4) { animation-delay: 0.4s; }
.medication-card:nth-child(5) { animation-delay: 0.5s; }
.medication-card:nth-child(6) { animation-delay: 0.6s; }

/* 对话框美化 */
.el-dialog {
    border-radius: 20px !important;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 248, 255, 0.95) 100%) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 20px 50px rgba(100, 181, 246, 0.3) !important;
    border: 1px solid rgba(173, 216, 230, 0.4) !important;
}

.el-dialog__header {
    background: linear-gradient(90deg, #e3f2fd, #bbdefb) !important;
    padding: 20px 24px !important;
    margin: 0 !important;
}

.el-dialog__title {
    color: #0d47a1 !important;
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
}

.el-dialog__body {
    padding: 30px 25px !important;
}

.el-dialog__footer {
    background: rgba(240, 248, 255, 0.8) !important;
    padding: 20px 24px !important;
    border-top: 1px solid rgba(173, 216, 230, 0.3) !important;
}

.el-form-item__label {
    color: #546e7a !important;
    font-weight: 500 !important;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .medication-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 600px) {
    .medication-container {
        padding: 20px 15px;
    }

    .medication-list {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }



    h1 {
        font-size: 2.2rem;
    }
}





@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

.medication-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vertical-warning {
  order: -1;
  background: #fffbe6;
  border-left: 4px solid #ffd666;
  padding: 12px 20px;
  margin: 0 0 20px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

@media (max-width: 768px) {
  .vertical-warning {
    margin: 0 -15px 30px;
    border-left: none;
    border-bottom: 2px solid #ffd666;
  }
}

/* 新增延迟渐显动画 */
@keyframes fadeInDelay {
  0% { opacity: 0; }
  100% { opacity: 0.9; }
}

.vertical-warning {
  opacity: 0;
  animation: fadeInDelay 1s ease-in 2s forwards;
}